import java.util.Scanner;

public class Main2 {
		public static void main(String[] args) {
			Scanner scan = new Scanner(System.in);
			long a = scan.nextLong();
			long b = scan.nextLong();
			long n = scan.nextLong();
			long x = 5*a + 2*b;
			n = n - ((n / x) *x);
			int count = 0;
			int sum = 0;
			while(x < n){
				for(int i = 0 ; i < 5 ; i++){
//					sum +=
				}
			}
			scan.close();
		
	}
}
